<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/WEB-INF/tld/ce.tld" prefix="ce"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/sys/org/";  //应用的地址名
String treeName = request.getParameter("treeName");   //机构树的名称
String viewAreaName = request.getParameter("viewAreaName");  //机构查看区域的id名称
String treeType = request.getParameter("treeType");    //树的类型
String addActionName = basePath+"SysOrg_openRootOrgAddPage.action";
String editActionName = basePath+"SysOrg_openRootOrgModifyPage.action";
%>
<script type="text/javascript">
<!--
$(function(){
 //=======================面板初始化===================================
	$('#org').panel({
	  title: '机构设置：<s:property value="#request.org.vcName"/>',
	  fit: true
	});
//=========================按钮初始化===================================	
	$('#modify').linkbutton({
	   iconCls:"icon-save"
	});
	$('#add').linkbutton({
	   iconCls:"icon-add"
	});
	$('#refresh').linkbutton({
	   iconCls:"icon-reload"
	});
//===========================按钮事件===============================	
    //修改操作
	$('#modify').click(function(){
          defaultOpenWindow('<%=editActionName%>?treeType=<%=treeType%>&viewAreaName=<%=viewAreaName%>&treeName=<%=treeName%>&vcId=<s:property value="#request.org.vcId"/>','修改记录',400,255,'','',{but:[{id:'modifyBtn',name:'保存',classname:'icon-save'}]});
	});
	//添加下级机构操作
	$('#add').click(function(){	
	    <%if("dep".equals(treeType)){%>
          defaultOpenAddPageHavebtn('<%=addActionName%>?treeType=<%=treeType%>&treeName=<%=treeName%>&pid=<s:property value="#request.org.vcId"/>',400,265);
        <%}else{%>
          defaultOpenAddPageHavebtn('<%=addActionName%>?treeType=<%=treeType%>&treeName=<%=treeName%>&pid=<s:property value="#request.org.vcId"/>',400,330);
          <%}%>     
	});
	//刷新机构树
	$('#refresh').click(function(){
	    location.reload(); 
	    //$('#<s:property value="#parameters.treeName"/>').tree('reload');
	});
});


//-->
</script>
<div id="org" style="padding:1px;">
    
    <table style="width:100%"  class="tb_add_th">
        <tr><th style="width:20%">机构名称：</th><td><s:property value="#request.org.vcName"/></td></tr>
        <tr><th>机构简称：</th><td><s:property value="#request.org.vcAbbr"/></td></tr>
        <tr><th>描述：</th><td><s:property value="#request.org.vcDesc"/></td></tr>
        <tr><th>备注：</th><td><s:property value="#request.org.vcNote"/></td></tr>
        <tr><th colspan="2" style="height:60px">
         <ce:includeColum optName="modify" menuUrl="/ntax/sys/org/SysDep.action">
        	<a id="modify"  href="javascript:void(0)" class="easyui-linkbutton" >修改</a>
         </ce:includeColum>
         <ce:includeColum optName="add" menuUrl="/ntax/sys/org/SysDep.action">
        	<a id="add" href="javascript:void(0)"  class="easyui-linkbutton" >增加下级</a>
         </ce:includeColum>
	        <a id="refresh"  href="javascript:void(0)" class="easyui-linkbutton" >刷新</a>
        </th></tr>
    </table>
</div>